(1) Field of the Invention
The invention relates to switching between audio streams. More specifically, the invention relates to a method and apparatus for avoiding a transient click in switching between two serial audio streams.
(2) Background
Switching between audio streams, there is often a problem with a clicking transient when significant differences exist between two adjacent samples in the different streams. Thus, techniques for shaping and blending the audio streams have been developed. Typically, in the context of two serial audio streams, samples from both audio streams are brought in and deserialized. The deserialized sample of the first audio stream is multiplied by a constant, and the deserialized sample from the second audio stream is multiplied by one minus the constant. The resulting products are added together, reserialized, and that becomes the output audio signal. FIG. 1 is a block diagram of one prior art solution. A first and second audio stream each enters a deserializer 110. A deserialized audio sample is multiplied in multiplier 112 by a constant K for the first audio stream, and a deserialized sample from the second audio stream is multiplied in multiplier 114 by 1-K. The resulting product samples are summed in adder 116 and generate a parallel audio output signal. The parallel audio output signal is then serialized by the serializer to generate a serial audio output stream. In this example, the constant K varies between zero and one. Audio declicking in this manner requires a large number of registers for the deserialization and reserialization of the two input streams. Thus, this implementation is problematic in area-constrained applications.
A method and apparatus to switch between two audio streams without creating a clicking transient is disclosed. A first serial audio stream is brought into a serial shift register. A series of samples of that audio stream are multiplied by reducing coefficients until a contribution of the first audio stream reaches zero. Then, a second serial audio stream is brought into the serial shift register. Increasing coefficients are applied to a series of samples until a contribution of the second audio stream is one.